/**
 * 文件名：SessionModel.java
 *
 * 版本信息：
 * 日期：2011-4-11
 * Copyright EasyDevelop.CN 2011
 *
 */
package com.djzhou.gmms.util.session;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.aspectj.apache.bcel.generic.NEW;

import com.djzhou.gmms.model.role.TbRole;
import com.djzhou.gmms.model.user.TbUser;

/**
*
* 项目名称：nfp_hlj
* 类名称：SessionModel
* 类描述：存储用户登录后各模块的相关信息的模型
* 创建人：linhu
* 创建时间：2011-4-11
* 修改人：
* 修改时间：
* 修改备注：
* @version
*/
public class SessionModel {

	public SessionModel() {
		
	}
	/**
	 * 用户
	 */
	private TbUser user;
	/**
	 * 角色
	 */
	private List<TbRole> roleList;
	
	private String roleIds;
	
	private String roleNames;
	
	private TbRole mainRole;
	
	private Boolean openComFlag;//是否开启公司级层级权限
	
	private Boolean openDepFlag;//是否开启部门级层级权限

	/**
	 * Session标识位
	 */
	private Boolean sessionIsInstance = Boolean.FALSE;
	/**
	 * 子公司ID
	 */
	private String childCompanyIds="";
	/**
	 * 下级部门ID
	 */
	private String childDepartmentIds="";
	
	private Map<String, Object> sessionMap=new HashMap<String, Object>();


	public SessionModel(TbUser user, List<TbRole> roleList,String roleIds,String roleNames,TbRole mainRole) {
		super();
		this.user = user;
		this.roleList= roleList;
		this.roleIds= roleIds;
		this.roleNames= roleNames;
		this.mainRole=mainRole;
	}

	public SessionModel(TbUser user, List<TbRole> roleList,String roleIds,String roleNames,Boolean sessionIsInstance,TbRole mainRole) {
		super();
		this.user = user;
		this.roleList= roleList;
		this.roleIds= roleIds;
		this.roleNames= roleNames;
		this.sessionIsInstance = sessionIsInstance;
		this.mainRole=mainRole;
	}

	public TbUser getUser() {
		return user;
	}

	public void setUser(TbUser user) {
		this.user = user;
	}

	public Boolean getSessionIsInstance() {
		return sessionIsInstance;
	}

	public void setSessionIsInstance(Boolean sessionIsInstance) {
		this.sessionIsInstance = sessionIsInstance;
	}

	public String getChildCompanyIds() {
		return childCompanyIds;
	}

	public void setChildCompanyIds(String childCompanyIds) {
		this.childCompanyIds = childCompanyIds;
	}

	public String getChildDepartmentIds() {
		return childDepartmentIds;
	}

	public void setChildDepartmentIds(String childDepartmentIds) {
		this.childDepartmentIds = childDepartmentIds;
	}

	public List<TbRole> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<TbRole> roleList) {
		this.roleList = roleList;
	}

	public String getRoleIds() {
		return roleIds;
	}

	public void setRoleIds(String roleIds) {
		this.roleIds = roleIds;
	}

	public String getRoleNames() {
		return roleNames;
	}

	public void setRoleNames(String roleNames) {
		this.roleNames = roleNames;
	}

	public Boolean getOpenComFlag() {
		return openComFlag;
	}

	public void setOpenComFlag(Boolean openComFlag) {
		this.openComFlag = openComFlag;
	}

	public Boolean getOpenDepFlag() {
		return openDepFlag;
	}

	public void setOpenDepFlag(Boolean openDepFlag) {
		this.openDepFlag = openDepFlag;
	}

	public TbRole getMainRole() {
		return mainRole;
	}

	public void setMainRole(TbRole mainRole) {
		this.mainRole = mainRole;
	}

	public Map<String, Object> getSessionMap() {
		return sessionMap;
	}

	public void setSessionMap(Map<String, Object> sessionMap) {
		this.sessionMap = sessionMap;
	}
	
	
}
